//
//  WBDemoViewController.swift
//  simpleWeibo
//
//  Created by 孙林 on 2017/9/9.
//  Copyright © 2017年 孙林. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseController {

    override func viewDidLoad() {
        super.viewDidLoad()
        title = "第\(navigationController?.children.count ?? 0)个"
    }
    
    @objc fileprivate func didClickRightBarButtonItem() {
        let vc = WBDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
        
    }
    
    @objc fileprivate func didClickLeftBarButtonItem() {
        
        navigationController?.popViewController(animated: true)
        
    }
    
}

extension WBDemoViewController {
    
    override func setupTableView() {
        super.setupTableView()
        
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(didClickRightBarButtonItem), isBack: false)

    }
}
